Skip to content

init: gitignore bmalph/state/ (mutable runtime state)#196

Open
selimdev00 wants to merge 2 commits into
LarsCowe:mainfrom
selimdev00:fix/gitignore-runtime-state
Open

init: gitignore bmalph/state/ (mutable runtime state)#196
selimdev00 wants to merge 2 commits into
LarsCowe:mainfrom
selimdev00:fix/gitignore-runtime-state

Conversation

@selimdev00

Copy link
Copy Markdown

Problem

bmalph/state/current-phase.json is mutable runtime state, rewritten by writeState every time the phase advances. But GITIGNORE_ENTRIES only ignores .ralph/logs/, _bmad-output/, and .swarm/ - so bmalph/state/ is left untracked-but-not-ignored. On a repo where the user commits the bmalph scaffolding, git add -A then sweeps this churny state file into version control, and it shows up as noise in every subsequent diff.

This is the same class of path as .ralph/logs/ (already ignored) - generated runtime state, not scaffolding.

Fix

Add bmalph/state/ to GITIGNORE_ENTRIES. That single source of truth flows to all three consumers automatically:

  • init writes it into .gitignore
  • doctor verifies it's present (checkGitignore)
  • reset removes it on cleanup

Scope note: this intentionally ignores only the state dir. The scaffolding dirs (_bmad/, .ralph/, bmalph/config.json) are left tracked, matching the existing design where those are meant to be committable.

Tests

  • Updated the "all required entries" health-check fixture and the doctor integration .gitignore fixture to include the new entry.
  • Added a check that checkGitignore fails (and names bmalph/state/) when it's missing.
  • Full unit suite (1836) + doctor e2e pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant